package com.ifyyf.service.impl;

import com.ifyyf.dao.DeptDao;
import com.ifyyf.pojo.Dept;
import com.ifyyf.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author if
 * @Description: What is it
 * @Date 2021-08-24 下午 12:11
 */
@Service
public class DeptServiceImpl implements DeptService {
    @Autowired
    private DeptDao deptDao;

    @Override
    public int addDept(Dept dept) {
        return deptDao.addDept(dept);
    }

    @Override
    public int delDept(String deptno) {
        return deptDao.delDept(deptno);
    }

    @Override
    public int updateDept(Dept dept) {
        return deptDao.updateDept(dept);
    }

    @Override
    public Dept getById(Long deptno) {
        return deptDao.getById(deptno);
    }

    @Override
    public List<Dept> getAll() {
        return deptDao.getAll();
    }
}
